package com.anolesoft.integration.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * @author zyq
 * @date 2022/12/9
 */
@Mapper
public interface LoginForOthersMapper {
    /**
     * 根据胸卡号和厂代号获取登录人信息
     * @param eid
     * @param factoryId
     * @return
     */
    @Select("select b.username,b.password from (select a.objuid,a.factory_id from stf_employee a) a\n" +
            "inner join view_sys_user b on a.objuid = b.emp_uid\n" +
            "where b.username = #{eid, jdbcType=VARCHAR}\n" +
            "and a.factory_id = #{factoryId, jdbcType=VARCHAR}")
    Map<String,String> loginInfo(@Param("eid") String eid, @Param("factoryId") String factoryId);
}
